import request from '../utils/request'

export function loginByUsername (username, password) {
  const data = {
    username: username,
    password: password
  }
  // return request({
  //   url: '/api/login',
  //   method: 'post',
  //   data
  // })
  const res = request.postForm('/api/login', data)
  return res
}

export function getUserInfo (id) {
  return request({
    url: '/api/user/getById',
    method: 'get',
    params: { id }
  })
}
